
#include "ka-gles/gles.h"

using namespace ka;

IGLESDriver::~IGLESDriver() {
    /*nothing*/
}

GLESSurface::GLESSurface(IGLESDriver *driver, void *windowHandle, const GLESConfig *config)
: _driver(driver),
_handle(NULL),
_type(TYPE_NONE) {
    if (_driver) {
        _handle = _driver->createWindowSurface(windowHandle, config);
        /*FIXME: if (_driver->isValidHandle(_handle, TYPE_WINDOW)) ???*/
        if (_handle!=NULL) {
            _type = TYPE_WINDOW;
        }
    }
}

